\(\int \frac {x (a+b x+c x^2)}{\sqrt {1-d x} \sqrt {1+d x}} \, dx\) [15]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 31, antiderivative size = 79 \[ \int \frac {x \left (a+b x+c x^2\right )}{\sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {c x^2 \sqrt {1-d^2 x^2}}{3 d^2}-\frac {\left (2 \left (2 c+3 a d^2\right )+3 b d^2 x\right ) \sqrt {1-d^2 x^2}}{6 d^4}+\frac {b \arcsin (d x)}{2 d^3} \]

[Out]

1/2*b*arcsin(d*x)/d^3-1/3*c*x^2*(-d^2*x^2+1)^(1/2)/d^2-1/6*(3*b*d^2*x+6*a*d^2+4*c)*(-d^2*x^2+1)^(1/2)/d^4

Rubi [A] (verified)

Time = 0.09 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {1623, 1823, 794, 222} \[ \int \frac {x \left (a+b x+c x^2\right )}{\sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {\sqrt {1-d^2 x^2} \left (2 \left (3 a d^2+2 c\right )+3 b d^2 x\right )}{6 d^4}+\frac {b \arcsin (d x)}{2 d^3}-\frac {c x^2 \sqrt {1-d^2 x^2}}{3 d^2} \]

[In]

Int[(x*(a + b*x + c*x^2))/(Sqrt[1 - d*x]*Sqrt[1 + d*x]),x]

[Out]

-1/3*(c*x^2*Sqrt[1 - d^2*x^2])/d^2 - ((2*(2*c + 3*a*d^2) + 3*b*d^2*x)*Sqrt[1 - d^2*x^2])/(6*d^4) + (b*ArcSin[d
*x])/(2*d^3)

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 794

Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((e*f + d*g)*(2*p
+ 3) + 2*e*g*(p + 1)*x)*((a + c*x^2)^(p + 1)/(2*c*(p + 1)*(2*p + 3))), x] - Dist[(a*e*g - c*d*f*(2*p + 3))/(c*
(2*p + 3)), Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, p}, x] &&  !LeQ[p, -1]

Rule 1623

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[P
x*(a*c + b*d*x^2)^m*(e + f*x)^p, x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && PolyQ[Px, x] && EqQ[b*c + a*d,
 0] && EqQ[m, n] && (IntegerQ[m] || (GtQ[a, 0] && GtQ[c, 0]))

Rule 1823

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq, x], f = Coeff[Pq, x,
 Expon[Pq, x]]}, Simp[f*(c*x)^(m + q - 1)*((a + b*x^2)^(p + 1)/(b*c^(q - 1)*(m + q + 2*p + 1))), x] + Dist[1/(
b*(m + q + 2*p + 1)), Int[(c*x)^m*(a + b*x^2)^p*ExpandToSum[b*(m + q + 2*p + 1)*Pq - b*f*(m + q + 2*p + 1)*x^q
 - a*f*(m + q - 1)*x^(q - 2), x], x], x] /; GtQ[q, 1] && NeQ[m + q + 2*p + 1, 0]] /; FreeQ[{a, b, c, m, p}, x]
 && PolyQ[Pq, x] && ( !IGtQ[m, 0] || IGtQ[p + 1/2, -1])

Rubi steps \begin{align*} \text {integral}& = \int \frac {x \left (a+b x+c x^2\right )}{\sqrt {1-d^2 x^2}} \, dx \\ & = -\frac {c x^2 \sqrt {1-d^2 x^2}}{3 d^2}-\frac {\int \frac {x \left (-2 c-3 a d^2-3 b d^2 x\right )}{\sqrt {1-d^2 x^2}} \, dx}{3 d^2} \\ & = -\frac {c x^2 \sqrt {1-d^2 x^2}}{3 d^2}-\frac {\left (2 \left (2 c+3 a d^2\right )+3 b d^2 x\right ) \sqrt {1-d^2 x^2}}{6 d^4}+\frac {b \int \frac {1}{\sqrt {1-d^2 x^2}} \, dx}{2 d^2} \\ & = -\frac {c x^2 \sqrt {1-d^2 x^2}}{3 d^2}-\frac {\left (2 \left (2 c+3 a d^2\right )+3 b d^2 x\right ) \sqrt {1-d^2 x^2}}{6 d^4}+\frac {b \sin ^{-1}(d x)}{2 d^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.95 \[ \int \frac {x \left (a+b x+c x^2\right )}{\sqrt {1-d x} \sqrt {1+d x}} \, dx=\frac {\sqrt {1-d^2 x^2} \left (-4 c-6 a d^2-3 b d^2 x-2 c d^2 x^2\right )}{6 d^4}+\frac {b \arctan \left (\frac {d x}{-1+\sqrt {1-d^2 x^2}}\right )}{d^3} \]

[In]

Integrate[(x*(a + b*x + c*x^2))/(Sqrt[1 - d*x]*Sqrt[1 + d*x]),x]

[Out]

(Sqrt[1 - d^2*x^2]*(-4*c - 6*a*d^2 - 3*b*d^2*x - 2*c*d^2*x^2))/(6*d^4) + (b*ArcTan[(d*x)/(-1 + Sqrt[1 - d^2*x^
2])])/d^3

Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 5.67 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.76

method result size
default \(-\frac {\sqrt {-d x +1}\, \sqrt {d x +1}\, \left (2 \,\operatorname {csgn}\left (d \right ) c \,d^{2} x^{2} \sqrt {-d^{2} x^{2}+1}+3 \sqrt {-d^{2} x^{2}+1}\, \operatorname {csgn}\left (d \right ) b \,d^{2} x +6 \,\operatorname {csgn}\left (d \right ) \sqrt {-d^{2} x^{2}+1}\, a \,d^{2}+4 \,\operatorname {csgn}\left (d \right ) \sqrt {-d^{2} x^{2}+1}\, c -3 \arctan \left (\frac {\operatorname {csgn}\left (d \right ) d x}{\sqrt {-d^{2} x^{2}+1}}\right ) b d \right ) \operatorname {csgn}\left (d \right )}{6 d^{4} \sqrt {-d^{2} x^{2}+1}}\) \(139\)
risch \(\frac {\left (2 c \,d^{2} x^{2}+3 b \,d^{2} x +6 a \,d^{2}+4 c \right ) \sqrt {d x +1}\, \left (d x -1\right ) \sqrt {\left (-d x +1\right ) \left (d x +1\right )}}{6 d^{4} \sqrt {-\left (d x +1\right ) \left (d x -1\right )}\, \sqrt {-d x +1}}+\frac {b \arctan \left (\frac {\sqrt {d^{2}}\, x}{\sqrt {-d^{2} x^{2}+1}}\right ) \sqrt {\left (-d x +1\right ) \left (d x +1\right )}}{2 d^{2} \sqrt {d^{2}}\, \sqrt {-d x +1}\, \sqrt {d x +1}}\) \(141\)

[In]

int(x*(c*x^2+b*x+a)/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/6*(-d*x+1)^(1/2)*(d*x+1)^(1/2)*(2*csgn(d)*c*d^2*x^2*(-d^2*x^2+1)^(1/2)+3*(-d^2*x^2+1)^(1/2)*csgn(d)*b*d^2*x
+6*csgn(d)*(-d^2*x^2+1)^(1/2)*a*d^2+4*csgn(d)*(-d^2*x^2+1)^(1/2)*c-3*arctan(csgn(d)*d*x/(-d^2*x^2+1)^(1/2))*b*
d)*csgn(d)/d^4/(-d^2*x^2+1)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.99 \[ \int \frac {x \left (a+b x+c x^2\right )}{\sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {6 \, b d \arctan \left (\frac {\sqrt {d x + 1} \sqrt {-d x + 1} - 1}{d x}\right ) + {\left (2 \, c d^{2} x^{2} + 3 \, b d^{2} x + 6 \, a d^{2} + 4 \, c\right )} \sqrt {d x + 1} \sqrt {-d x + 1}}{6 \, d^{4}} \]

[In]

integrate(x*(c*x^2+b*x+a)/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="fricas")

[Out]

-1/6*(6*b*d*arctan((sqrt(d*x + 1)*sqrt(-d*x + 1) - 1)/(d*x)) + (2*c*d^2*x^2 + 3*b*d^2*x + 6*a*d^2 + 4*c)*sqrt(
d*x + 1)*sqrt(-d*x + 1))/d^4

Sympy [F(-1)]

Timed out. \[ \int \frac {x \left (a+b x+c x^2\right )}{\sqrt {1-d x} \sqrt {1+d x}} \, dx=\text {Timed out} \]

[In]

integrate(x*(c*x**2+b*x+a)/(-d*x+1)**(1/2)/(d*x+1)**(1/2),x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.10 \[ \int \frac {x \left (a+b x+c x^2\right )}{\sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {\sqrt {-d^{2} x^{2} + 1} c x^{2}}{3 \, d^{2}} - \frac {\sqrt {-d^{2} x^{2} + 1} b x}{2 \, d^{2}} - \frac {\sqrt {-d^{2} x^{2} + 1} a}{d^{2}} + \frac {b \arcsin \left (d x\right )}{2 \, d^{3}} - \frac {2 \, \sqrt {-d^{2} x^{2} + 1} c}{3 \, d^{4}} \]

[In]

integrate(x*(c*x^2+b*x+a)/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="maxima")

[Out]

-1/3*sqrt(-d^2*x^2 + 1)*c*x^2/d^2 - 1/2*sqrt(-d^2*x^2 + 1)*b*x/d^2 - sqrt(-d^2*x^2 + 1)*a/d^2 + 1/2*b*arcsin(d
*x)/d^3 - 2/3*sqrt(-d^2*x^2 + 1)*c/d^4

Giac [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.96 \[ \int \frac {x \left (a+b x+c x^2\right )}{\sqrt {1-d x} \sqrt {1+d x}} \, dx=\frac {6 \, b d \arcsin \left (\frac {1}{2} \, \sqrt {2} \sqrt {d x + 1}\right ) - {\left (6 \, a d^{2} + {\left (2 \, {\left (d x + 1\right )} c + 3 \, b d - 4 \, c\right )} {\left (d x + 1\right )} - 3 \, b d + 6 \, c\right )} \sqrt {d x + 1} \sqrt {-d x + 1}}{6 \, d^{4}} \]

[In]

integrate(x*(c*x^2+b*x+a)/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="giac")

[Out]

1/6*(6*b*d*arcsin(1/2*sqrt(2)*sqrt(d*x + 1)) - (6*a*d^2 + (2*(d*x + 1)*c + 3*b*d - 4*c)*(d*x + 1) - 3*b*d + 6*
c)*sqrt(d*x + 1)*sqrt(-d*x + 1))/d^4

Mupad [B] (verification not implemented)

Time = 8.58 (sec) , antiderivative size = 244, normalized size of antiderivative = 3.09 \[ \int \frac {x \left (a+b x+c x^2\right )}{\sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {\sqrt {1-d\,x}\,\left (\frac {a}{d^2}+\frac {a\,x}{d}\right )}{\sqrt {d\,x+1}}-\frac {2\,b\,\mathrm {atan}\left (\frac {\sqrt {1-d\,x}-1}{\sqrt {d\,x+1}-1}\right )}{d^3}-\frac {\frac {14\,b\,{\left (\sqrt {1-d\,x}-1\right )}^3}{{\left (\sqrt {d\,x+1}-1\right )}^3}-\frac {14\,b\,{\left (\sqrt {1-d\,x}-1\right )}^5}{{\left (\sqrt {d\,x+1}-1\right )}^5}+\frac {2\,b\,{\left (\sqrt {1-d\,x}-1\right )}^7}{{\left (\sqrt {d\,x+1}-1\right )}^7}-\frac {2\,b\,\left (\sqrt {1-d\,x}-1\right )}{\sqrt {d\,x+1}-1}}{d^3\,{\left (\frac {{\left (\sqrt {1-d\,x}-1\right )}^2}{{\left (\sqrt {d\,x+1}-1\right )}^2}+1\right )}^4}-\frac {\sqrt {1-d\,x}\,\left (\frac {2\,c}{3\,d^4}+\frac {c\,x^3}{3\,d}+\frac {c\,x^2}{3\,d^2}+\frac {2\,c\,x}{3\,d^3}\right )}{\sqrt {d\,x+1}} \]

[In]

int((x*(a + b*x + c*x^2))/((1 - d*x)^(1/2)*(d*x + 1)^(1/2)),x)

[Out]

- ((1 - d*x)^(1/2)*(a/d^2 + (a*x)/d))/(d*x + 1)^(1/2) - (2*b*atan(((1 - d*x)^(1/2) - 1)/((d*x + 1)^(1/2) - 1))
)/d^3 - ((14*b*((1 - d*x)^(1/2) - 1)^3)/((d*x + 1)^(1/2) - 1)^3 - (14*b*((1 - d*x)^(1/2) - 1)^5)/((d*x + 1)^(1
/2) - 1)^5 + (2*b*((1 - d*x)^(1/2) - 1)^7)/((d*x + 1)^(1/2) - 1)^7 - (2*b*((1 - d*x)^(1/2) - 1))/((d*x + 1)^(1
/2) - 1))/(d^3*(((1 - d*x)^(1/2) - 1)^2/((d*x + 1)^(1/2) - 1)^2 + 1)^4) - ((1 - d*x)^(1/2)*((2*c)/(3*d^4) + (c
*x^3)/(3*d) + (c*x^2)/(3*d^2) + (2*c*x)/(3*d^3)))/(d*x + 1)^(1/2)